import React, {FC} from "react";
import styled from "styled-components";
const RegisterGroup = styled.form`
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: absolute;
    transition: 0.5s;
    box-sizing: border-box;
    padding: 20px;
`;

const InputField = styled.input`
    width: 100%;
    padding: 10px 5px;
    margin: 10px 0;
    border-top: 0;
    border-left: 2px solid #57AAB4;
    border-right: 0;
    border-bottom: 2px solid #57AAB4;
    outline: none;
    background: transparent;
    color: rgb(234, 234, 235);
    font-size: 15px;
    transition: 0.5s;

    &:focus {
        border-left: 2px solid transparent;
        border-bottom: 2px solid transparent;
        animation: animINP 5s linear infinite, animBTN 5s linear infinite;
    }
`;
const SubmitInputField=styled.input`
        width: 85%;
        padding: 10px 30px;
        cursor: pointer;
        display: block;
        margin: 30px auto 0 auto;
        background: linear-gradient(to right, #03a9f4,#57AAB4,#03a9f4);
        border:0;
        outline: none;
        border-radius: 30px;
        position: relative;
        z-index: 5;
        box-sizing: border-box;
        color:#fff;
        font-weight: bold;
        font-size:15px;
        transition: 0.5s;
    &:hover {
        background:#57AAB4;
        color: #fff;
        border-radius: 30px;
        box-shadow: 0 0 5px #57AAB4,
        0 0 25px #57AAB4,
        0 0 50px #57AAB4,
        0 0 100px #03e9f4;
    }
`
const RegisterWarp:FC = () => {
    const handleRegister = () => {
        console.log("注册账号信息")
    }
    return (
        <>
            <RegisterGroup id="register">
                <InputField
                    type="text"
                    placeholder="请输入用户名"
                    required
                />
                <InputField
                    type="email"
                    placeholder="请输入邮箱"
                    required
                />
                <InputField
                    id="pwd"
                    type="password"
                    placeholder="请输入密码"
                    required
                />
                <SubmitInputField
                    type="submit"
                    value="注册"
                    onClick={handleRegister}
                />
            </RegisterGroup>
        </>
    )
}
export default RegisterWarp
